<template>
	<view class="container">
		<uni-search-bar v-model="searchTxt" placeholder="请输入搜索内容" @input="searchTxtChange">
		</uni-search-bar>
		
		<view class="card" v-if="searchTxt.length !=0">
			<view class="card-title">
				<view class="title-text">搜索结果</view>
			</view>
			<view class="card-body">
				<uni-grid :column="4" :show-border="false" :square="false" @change="clickSearchResults">
					<uni-grid-item v-for="(item, index) in searchResults" :index="index" :key="index">
						<view class="image-content">
							<image class="icon" :src="dashboardItemInfo[item].icon"></image><br>
							<text class="text-name">{{dashboardItemInfo[item].name}}</text>
						</view>
					</uni-grid-item>
				</uni-grid>
			</view>
		</view>

		<view class="card" v-if="changyong.length !=0 && searchTxt.length == 0">
			<view class="card-title">
				<view class="title-text">常用</view>
			</view>
			<view class="card-body">
				<uni-grid :column="4" :show-border="false" :square="false" @change="clickChangyong">
					<uni-grid-item v-for="(item, index) in changyong" :index="index" :key="index">
						<view class="image-content" v-if="index < 8">
							<image class="icon" :src="dashboardItemInfo[item].icon"></image><br>
							<text class="text-name">{{dashboardItemInfo[item].name}}</text>
						</view>
					</uni-grid-item>
				</uni-grid>
			</view>
		</view>

		<view class="card" v-if="tongzhiguanli.length != 0 && searchTxt.length == 0">
			<view class="card-title">
				<view class="title-text">通知</view>
			</view>
			<view class="card-body">
				<uni-grid :column="4" :show-border="false" :square="false" @change="clickTongzhiguanli">
					<uni-grid-item v-for="(item, index) in tongzhiguanli" :index="index" :key="index">
						<view class="image-content">
							<image class="icon" :src="dashboardItemInfo[item].icon"></image><br>
							<text class="text-name">{{dashboardItemInfo[item].name}}</text>
						</view>
					</uni-grid-item>
				</uni-grid>
			</view>
		</view>

		<view class="card" v-if="gongwenguanli.length != 0 && searchTxt.length == 0">
			<view class="card-title">
				<view class="title-text">公文</view>
			</view>
			<view class="card-body">
				<uni-grid :column="4" :show-border="false" :square="false" @change="clickGongwenguanli">
					<uni-grid-item v-for="(item, index) in gongwenguanli" :index="index" :key="index">
						<view class="image-content">
							<image class="icon" :src="dashboardItemInfo[item].icon"></image><br>
							<text class="text-name">{{dashboardItemInfo[item].name}}</text>
						</view>
					</uni-grid-item>
				</uni-grid>
			</view>
		</view>

		<view class="card" v-if="kaoqingguanli.length !=0 && searchTxt.length == 0">
			<view class="card-title">
				<view class="title-text">考勤</view>
			</view>
			<view class="card-body">
				<uni-grid :column="4" :show-border="false" :square="false" @change="clickKaoqinguanli">
					<uni-grid-item v-for="(item, index) in kaoqingguanli" :index="index" :key="index">
						<view class="image-content">
							<image class="icon" :src="dashboardItemInfo[item].icon"></image><br>
							<text class="text-name">{{dashboardItemInfo[item].name}}</text>
						</view>
					</uni-grid-item>
				</uni-grid>
			</view>
		</view>

		<view class="card" v-if="xingzhengguanli.length != 0 && searchTxt.length == 0">
			<view class="card-title">
				<view class="title-text">行政</view>
			</view>
			<view class="card-body">
				<uni-grid :column="4" :show-border="false" :square="false" @change="clickXingzhengguanli">
					<uni-grid-item v-for="(item, index) in xingzhengguanli" :index="index">
						<view class="image-content">
							<image class="icon" :src="dashboardItemInfo[item].icon"></image><br>
							<text class="text-name">{{dashboardItemInfo[item].name}}</text>
						</view>
					</uni-grid-item>
				</uni-grid>
			</view>
		</view>


		<view class="card" v-if="wuziguanli.length != 0">
			<view class="card-title">
				<view class="title-text">物资</view>
			</view>
			<view class="card-body">
				<uni-grid :column="4" :show-border="false" :square="false" @change="clickWuziguanli">
					<uni-grid-item v-for="(item, index) in wuziguanli" :index="index">
						<view class="image-content">
							<image class="icon" :src="dashboardItemInfo[item].icon"></image><br>
							<text class="text-name">{{dashboardItemInfo[item].name}}</text>
						</view>
					</uni-grid-item>
				</uni-grid>
			</view>
		</view>


		<view class="card" v-if="jiaqinguanli.length != 0">
			<view class="card-title">
				<view class="title-text">假勤</view>
			</view>
			<view class="card-body">
				<uni-grid :column="4" :show-border="false" :square="false" @change="clickJiaqinguanli">
					<uni-grid-item v-for="(item, index) in jiaqinguanli" :index="index">
						<view class="image-content">
							<image class="icon" :src="dashboardItemInfo[item].icon"></image><br>
							<text class="text-name">{{dashboardItemInfo[item].name}}</text>
						</view>
					</uni-grid-item>
				</uni-grid>
			</view>
		</view>


		<view class="card" v-if="fawuguanli.length != 0">
			<view class="card-title">
				<view class="title-text">法务</view>
			</view>
			<view class="card-body">
				<uni-grid :column="4" :show-border="false" :square="false" @change="clickFawuguanli">
					<uni-grid-item v-for="(item, index) in fawuguanli" :index="index">
						<view class="image-content">
							<image class="icon" :src="dashboardItemInfo[item].icon"></image><br>
							<text class="text-name">{{dashboardItemInfo[item].name}}</text>
						</view>
					</uni-grid-item>
				</uni-grid>
			</view>
		</view>

		<view class="card" v-if="renshiguanli.length != 0">
			<view class="card-title">
				<view class="title-text">人事</view>
			</view>
			<view class="card-body">
				<uni-grid :column="4" :show-border="false" :square="false" @change="clickRenshiguanli">
					<uni-grid-item v-for="(item, index) in renshiguanli" :index="index">
						<view class="image-content">
							<image class="icon" :src="dashboardItemInfo[item].icon"></image><br>
							<text class="text-name">{{dashboardItemInfo[item].name}}</text>
						</view>
					</uni-grid-item>
				</uni-grid>
			</view>
		</view>
		<view class="card" v-if="dangjianguanli.length != 0">
			<view class="card-title">
				<view class="title-text">党建管理</view>
			</view>
			<view class="card-body">
				<uni-grid :column="4" :show-border="false" :square="false">
					<uni-grid-item v-for="(item, index) in dangjianguanli" :key="index" @click="clickDJguanli(index)">
						<view class="image-content">
							<image class="icon" :src="dashboardItemInfo[item].icon"></image><br>
							<text class="text-name">{{dashboardItemInfo[item].name}}</text>
						</view>
					</uni-grid-item>
				</uni-grid>
			</view>
		</view>

	</view>

</template>

<script>
	import {
		dashboardItemInfo,
		shangbanEndConfig,
		shangbanStartConfig,
		xiabanEndConfig,
		xiabanStartConfig
	} from '../../const'
	import {
		websock
	} from '../../net/websock'
	import moment from 'moment'
	import {
		getDistance
	} from '../../utils/util'
	import {
		apiIdentityInfo //登陆人身份信息
	} from "../../net/dagnqunhuodong.js";
	import socket from '../../net/socket'

	export default {
		data() {
			return {
				identityInfo: null,
				dashboardItemInfo,

				changyongStore: {},

				userRoutes: [],
				// 搜索结果
				searchResults: [],
				// 常用
				changyong: [],
				// 通知管理
				tongzhiguanli: ['huiyitongzhi', 'gongzuotongzhi','huiyifankui'],
				// 物资管理
				wuziguanli: ['caigoushenqingdan', 'wuzilingyong'],
				// 假勤管理
				jiaqinguanli: [],
				// 人事管理
				renshiguanli: ['ruzhishenpi', 'zhuanzhengshenqing', 'lizhijiaojie', 'gongzidan'],
				// 行政管理
				xingzhengguanli: ['dubandan', 'paiban', 'yongyinshenqing', 'yongcheshenqing', 'cheliangjiayou',
					'huiyishishenqing', 'jiedaidanshenqing','gongzuocan'
				],
				//法务管理
				fawuguanli: ['hetongshencha', 'zhaobiaowenjian'],
				// 公文管理
				gongwenguanli: ['chuanyuewenjian', 'gongwenliuzhuan', 'neibufawen','xinjianfawen','xuanchuanbaodao'],
				// 考勤管理
				kaoqingguanli: ['daka', 'qingjia', 'gongwuchuchai', 'jiaban', 'kaoqintongji', 'kaoqinshezhi','zhibanjilu'],
				searchTxt: '',
				// 党建管理
				dangjianguanli: []
			}
		},

		async onShow() {
			await this.getUnfinishedTaskCnt()
			// await this.getUnreadNotificationCnt()
			console.log('dashboard on show')

			this.checkAutoDaka()
		},
		onLoad() {
			uni.$on('TASK-CHANGE', this.taskChange)
			uni.$on('TASK-REVERT', this.taskChange)
			// uni.$on('NOTIFICATION-CHANGE', this.notificationChange)
			
			let changyong = uni.getStorageSync('changyong') || '{}'
			try {
				this.changyongStore = JSON.parse(changyong)
				console.log(this.changyongStore)
				this.changyong = Object.keys(this.changyongStore)
				this.changyong.sort((a, b) => {
					return this.changyongStore[b] - this.changyongStore[a]
				})
				console.log('changyong', this.changyong)
			} catch (err) {
				console.error(err)
				this.changyongStore = {}
				this.changyong = []
			}
			this.getIdentityInfo();
		},
		onUnload() {
			uni.$off('TASK-CHANGE', this.taskChange)
			uni.$off('TASK-REVERT', this.taskChange)
			// uni.$off('NOTIFICATION-CHANGE', this.notificationChange)
		},
		async mounted() {
			await this.getRoutes()
			this.setRoot()
		},
		methods: {
			searchTxtChange(res) {
				console.log('search text change', res, typeof res)
				this.searchResults = []

				for (let i = 0; i != this.tongzhiguanli.length; i++) {
					let name = this.dashboardItemInfo[this.tongzhiguanli[i]].name
					if (name.indexOf(res) != -1) {
						this.searchResults.push(this.tongzhiguanli[i])
					}
				}

				for (let i = 0; i != this.wuziguanli.length; i++) {
					let name = this.dashboardItemInfo[this.wuziguanli[i]].name
					if (name.indexOf(res) != -1) {
						this.searchResults.push(this.wuziguanli[i])
					}
				}

				for (let i = 0; i != this.jiaqinguanli.length; i++) {
					let name = this.dashboardItemInfo[this.jiaqinguanli[i]].name
					if (name.indexOf(res) != -1) {
						this.searchResults.push(this.jiaqinguanli[i])
					}
				}

				for (let i = 0; i != this.renshiguanli.length; i++) {
					let name = this.dashboardItemInfo[this.renshiguanli[i]].name
					if (name.indexOf(res) != -1) {
						this.searchResults.push(this.renshiguanli[i])
					}
				}

				for (let i = 0; i != this.xingzhengguanli.length; i++) {
					let name = this.dashboardItemInfo[this.xingzhengguanli[i]].name
					if (name.indexOf(res) != -1) {
						this.searchResults.push(this.xingzhengguanli[i])
					}
				}

				for (let i = 0; i != this.fawuguanli.length; i++) {
					let name = this.dashboardItemInfo[this.fawuguanli[i]].name
					if (name.indexOf(res) != -1) {
						this.searchResults.push(this.fawuguanli[i])
					}
				}

				for (let i = 0; i != this.gongwenguanli.length; i++) {
					let name = this.dashboardItemInfo[this.gongwenguanli[i]].name
					if (name.indexOf(res) != -1) {
						this.searchResults.push(this.gongwenguanli[i])
					}
				}

				for (let i = 0; i != this.kaoqingguanli.length; i++) {
					let name = this.dashboardItemInfo[this.kaoqingguanli[i]].name
					if (name.indexOf(res) != -1) {
						this.searchResults.push(this.kaoqingguanli[i])
					}
				}

			},
			getIdentityInfo() {
				const token = uni.getStorageSync('token') || ''
				apiIdentityInfo()
					.then((res) => {
						res.data.permission = res.data.permission.split(',')
						// 普通党员
						if (res.data.permission.includes('common')) {
							this.identityInfo = 1;
							this.dangjianguanli.push('DJdangyuanguanli', 'DJdangqunhuodong','DJjiaoyuxuexi','DJlilunceyan','DJshujufenxi');
							// 支部管理员
						} else if (res.data.permission.includes('admin')) {
							this.identityInfo = 0;
							this.dangjianguanli.push('DJdangyuanguanli', 'DJdangqunhuodong','DJjiaoyuxuexi','DJlilunceyan','DJshujufenxi');
							// 不是党支部的人
						} else if (res.data.permission.includes('superAdmin')) {
							this.identityInfo = 0;
							this.dangjianguanli.push('DJdangyuanguanli', 'DJdangqunhuodong','DJjiaoyuxuexi','DJlilunceyan','DJshujufenxi');
							// 不是党支部的人
						}
						 else if (!res.data.permission) {
							this.identityInfo = null;
						}
						uni.setStorage({
							key: "identityInfo",
							data: this.identityInfo,
						});
						uni.setStorage({
							key: "loginUserInfo",
							data: JSON.stringify(res.data)
						});
						uni.setStorage({
							key: "userInfo",
							data: res.data,
						});
						if (token) {
							socket.connect(token)
							uni.$on('message', this.getMessage)
						}
					})
					.catch((err) => {
						console.log(err);
					});
			},
			getMessage(msg) {
				uni.showTabBarRedDot({ index: 0 })
			},
			async checkAutoDaka() {
				try {
					// 获取考勤设置
					let kaoqinSetting = await websock.getKaoqinSetting()
					console.log('kaoqin setting', kaoqinSetting)

					let dateStr = moment().format('YYYY-MM-DD ')
					let shangbanTimeStr = dateStr + kaoqinSetting.shangbanTime + ':00'
					let xiabanTimeStr = dateStr + kaoqinSetting.xiabanTime + ':00'

					console.log(shangbanTimeStr, xiabanTimeStr)

					// 获取打卡设置
					let dakaSetting = await websock.getUserDakaSetting()
					console.log('dakaSetting', dakaSetting)

					let shangbanStartMinite = shangbanStartConfig[dakaSetting.shangbanStart]
					let shangbanStartStamp = moment(shangbanTimeStr).add(shangbanStartMinite, 'minute').valueOf()

					let shangbanEndMinite = shangbanEndConfig[dakaSetting.shangbanEnd]
					let shangbanEndStamp = moment(shangbanTimeStr).add(shangbanEndMinite, 'minute').valueOf()

					let xiabanStartMinite = xiabanStartConfig[dakaSetting.xiabanStart]
					let xiabanStartStamp = moment(xiabanTimeStr).add(xiabanStartMinite, 'minute').valueOf()

					let xiabanEndMinite = xiabanEndConfig[dakaSetting.xiabanEnd]
					let xiabanEndStamp = moment(xiabanTimeStr).add(xiabanEndMinite, 'minute').valueOf()

					let nowStamp = Date.now()

					let dakaInfo = await websock.getTodayDakaDetail()
					console.log('daka info', dakaInfo)

					// 上班自动打卡
					if (nowStamp > shangbanStartStamp && nowStamp < shangbanEndStamp && dakaSetting.shangbanAuto) {
						if (dakaInfo.shangbanTime != -1) return
						// 获取位置信息
						uni.getLocation({
							type: 'gcj02',
							geocode: true,
							success: res => {
								console.log('get location success', res)
								let dis = getDistance(kaoqinSetting.dakaLatitude, kaoqinSetting
									.dakaLongitude, res.latitude, res.longitude)
								if (dis < kaoqinSetting.dakaFanwei) {
									let address = ''
									if (res.address) {
										address += (res.address.province || '')
										address += (res.address.city || '')
										address += (res.address.district || '')
										address += (res.address.street || '')
										address += (res.address.streetNum || '')
										address += (res.address.poiName || '')
									}
									websock.daka({
										dakaType: 1,
										longitude: res.longitude,
										latitude: res.latitude,
										address
									}).then(() => {
										uni.showModal({
											title: '上班打卡成功',
											content: '打卡时间' + moment().format('mm:ss'),
											showCancel: false
										})
									})
								}
							},
							fail: () => {
								console.log('get location fail')
							},
							complete: () => {
								console.log('get location complete')
							}
						})
					}

					// 下班自动打卡
					if (nowStamp > xiabanStartStamp && nowStamp < xiabanEndStamp && dakaSetting.xiabanAuto) {
						if (dakaInfo.xiabanTime != -1 && dakaInfo.xiabanTime > moment(xiabanTimeStr).valueOf()) return
						// 获取位置信息
						uni.getLocation({
							type: 'gcj02',
							geocode: true,
							success: res => {
								console.log('get location success', res)
								let dis = getDistance(kaoqinSetting.dakaLatitude, kaoqinSetting
									.dakaLongitude, res.latitude, res.longitude)
								if (dis < kaoqinSetting.dakaFanwei) {
									let address = ''
									if (res.address) {
										address += (res.address.province || '')
										address += (res.address.city || '')
										address += (res.address.district || '')
										address += (res.address.street || '')
										address += (res.address.streetNum || '')
										address += (res.address.poiName || '')
									}
									websock.daka({
										dakaType: 2,
										longitude: res.longitude,
										latitude: res.latitude,
										address
									}).then(() => {
										uni.showModal({
											title: '下班打卡成功',
											content: '打卡时间' + moment().format('mm:ss'),
											showCancel: false
										})
									})
								}
							},
							fail: () => {
								console.log('get location fail')
							},
							complete: () => {
								console.log('get location complete')
							}
						})
					}
				} catch (err) {
					console.error(err)
				}
			},
			// 从服务器获取用户数据
			async getRoutes() {
				// 默认显示的数据
				this.userRoutes = ['daka', 'qingjia', 'gongwuchuchai', 'jiaban', 'kaoqintongji', 'yongyinshenqing',
					'yongcheshenqing', 'cheliangjiayou',
					'huiyishishenqing', 'caigoushenqingdan', 'wuzilingyong', 'lizhijiaojie', 'gongzidan'
				]

				try {
					let res = await websock.getUserPermissionsApp()
					console.log('getUserPermissionsApp', res)
					this.userRoutes = this.userRoutes.concat(res)
					console.log('getUserPermissionsApp', this.userRoutes)
				} catch (err) {
					console.error(err)
					uni.showToast({
						title: err.message || 'error'
					})
				}
			},
			// 根据获取的数据设置页面实际显示
			setRoot() {
				// 通知
				let arr1 = this.tongzhiguanli.concat()
				for (let item in this.tongzhiguanli) {
					if (!this.userRoutes.includes(this.tongzhiguanli[item])) {
						arr1.splice(arr1.indexOf(this.tongzhiguanli[item]), 1)
					}
				}
				this.tongzhiguanli = arr1.slice()
				console.log('通知模块', this.tongzhiguanli, arr1)
				// 公文
				let arr2 = this.gongwenguanli.concat()
				for (let item in this.gongwenguanli) {
					if (!this.userRoutes.includes(this.gongwenguanli[item])) {
						arr2.splice(arr2.indexOf(this.gongwenguanli[item]), 1)
					}
				}
				this.gongwenguanli = arr2.slice()
				console.log('通知模块', this.gongwenguanli, arr2)
				// 行政
				let arr3 = this.xingzhengguanli.concat()
				for (let item in this.xingzhengguanli) {
					if (!this.userRoutes.includes(this.xingzhengguanli[item])) {
						arr3.splice(arr3.indexOf(this.xingzhengguanli[item]), 1)
					}
				}
				this.xingzhengguanli = arr3.slice()
				console.log('通知模块', this.xingzhengguanli, arr3)
				// 考勤
				let arr4 = this.kaoqingguanli.concat()
				for (let item in this.kaoqingguanli) {
					if (!this.userRoutes.includes(this.kaoqingguanli[item])) {
						arr4.splice(arr4.indexOf(this.kaoqingguanli[item]), 1)
					}
				}
				this.kaoqingguanli = arr4.slice()
				console.log('通知模块', this.kaoqingguanli, arr4)
				// 物资
				let arr5 = this.wuziguanli.concat()
				for (let item in this.wuziguanli) {
					if (!this.userRoutes.includes(this.wuziguanli[item])) {
						arr5.splice(arr5.indexOf(this.wuziguanli[item]), 1)
					}
				}
				this.wuziguanli = arr5.slice()
				console.log('通知模块', this.wuziguanli, arr5)
				// 法务
				let arr6 = this.fawuguanli.concat()
				for (let item in this.fawuguanli) {
					if (!this.userRoutes.includes(this.fawuguanli[item])) {
						arr6.splice(arr6.indexOf(this.fawuguanli[item]), 1)
					}
				}
				this.fawuguanli = arr6.slice()
				console.log('通知模块', this.fawuguanli, arr6)
				// 人事
				let arr7 = this.renshiguanli.concat()
				for (let item in this.renshiguanli) {
					if (!this.userRoutes.includes(this.renshiguanli[item])) {
						arr7.splice(arr7.indexOf(this.renshiguanli[item]), 1)
					}
				}
				this.renshiguanli = arr7.slice()
				console.log('通知模块', this.renshiguanli, arr7)

				// // 党建管理
				// let arr8 = this.dangjianguanli.concat()
				// for (let item in this.dangjianguanli) {
				// 	if (!this.userRoutes.includes(this.dangjianguanli[item])) {
				// 		arr8.splice(arr8.indexOf(this.dangjianguanli[item]), 1)
				// 	}
				// }
				// this.dangjianguanli = arr8.slice()
				// console.log('党建管理', this.dangjianguanli, arr8)

			},
			clickSearchResults(e) {
				this.openPage(this.searchResults[e.detail.index])
			},
			// 党建管理
			clickDJguanli(e) {
				this.openPage(this.dangjianguanli[e])
			},
			clickChangyong(e) {
				this.openPage(this.changyong[e.detail.index])
			},
			clickTongzhiguanli(e) {
				this.openPage(this.tongzhiguanli[e.detail.index])
			},
			clickWuziguanli(e) {
				this.openPage(this.wuziguanli[e.detail.index])
			},
			clickJiaqinguanli(e) {
				this.openPage(this.jiaqinguanli[e.detail.index])
			},
			clickRenshiguanli(e) {
				this.openPage(this.renshiguanli[e.detail.index])
			},
			clickXingzhengguanli(e) {
				this.openPage(this.xingzhengguanli[e.detail.index])
			},
			clickFawuguanli(e) {
				this.openPage(this.fawuguanli[e.detail.index])
			},
			clickGongwenguanli(e) {
				this.openPage(this.gongwenguanli[e.detail.index])
			},
			clickKaoqinguanli(e) {
				this.openPage(this.kaoqingguanli[e.detail.index])
			},
			openPage(key) {
				console.log('open page', key)
				this.changyongStore[key] = this.changyongStore[key] || 0
				this.changyongStore[key]++
				this.changyong = Object.keys(this.changyongStore)
				this.changyong.sort((a, b) => {
					return this.changyongStore[b] - this.changyongStore[a]
				})
				console.log('changyong', this.changyongStore)
				uni.setStorageSync('changyong', JSON.stringify(this.changyongStore))
				uni.navigateTo({
					url: this.dashboardItemInfo[key].path
				})
			},
			async getUnfinishedTaskCnt() {
				try {
					let cnt = await websock.getUnfinishedTaskCnt()
					if (cnt == 0) {
						uni.removeTabBarBadge({
							index: 1
						})
					} else if (cnt > 99) {
						uni.setTabBarBadge({
							index: 1,
							text: '99+'
						})
					} else {
						uni.setTabBarBadge({
							index: 1,
							text: cnt + ''
						})
					}
				} catch (e) {
					uni.showToast({
						title: e.message
					})
				}
			},
			// async getUnreadNotificationCnt() {
			// 	try {
			// 		let cnt = await websock.getUnreadNotificationCnt()
			// 		if (cnt == 0) {
			// 			uni.removeTabBarBadge({
			// 				index: 0
			// 			})
			// 		} else if (cnt > 99) {
			// 			uni.setTabBarBadge({
			// 				index: 0,
			// 				text: '99+'
			// 			})
			// 		} else {
			// 			uni.setTabBarBadge({
			// 				index: 0,
			// 				text: cnt + ''
			// 			})
			// 		}
			// 	} catch (e) {
			// 		uni.showToast({
			// 			title: e.message
			// 		})
			// 	}
			// },
			taskChange() {
				this.getUnfinishedTaskCnt()
			},
			// notificationChange() {
			// 	this.getUnreadNotificationCnt()
			// }
		}
	}
</script>

<style>
	@import url("../common/dashboard.css");
</style>
